ulx.setCategory( "Utilities" )

function ulx.cc_ibwarn( ply, command, argv, args )
	if #argv < 1 then
		ULib.tsay( ply, ulx.LOW_ARGS, true )
		return
	end
	local targets, err = ULib.getUsers( argv[ 1 ], _, ply ) -- Enable keywords
	if not targets then
		ULib.tsay( ply, err, true )
		return
	end
	for _, v in ipairs( targets ) do
		if ulx.getExclusive( v, ply ) then
			ULib.tsay( ply, ulx.getExclusive( v, ply ), true )
		else
			ulx.logUserAct( ply, v, "#A has warned #T with IntelliBan." )
			http.Get("http://roelofr.djoamersfoort.nl/intelliban/givewarning.php?steamid="..v:SteamID().."&clanid="..IntelliBan_ClanID,"", function(args,c,s)
				checkIntellibanPlayer(args[1])
			end,v)
		end
	end
end
ulx.concommand( "ibwarn", ulx.cc_ibwarn, "<user> - Warn a user using IntelliBan, and ban him if nessesary.", ULib.ACCESS_ADMIN, "!ibwarn", _, ulx.ID_PLAYER_HELP )
ulx.addToMenu( ulx.ID_MCLIENT, "Warn with IntelliBan", "ulx ibwarn" )